package com.classtest;

public class test01 {
    public static void main(String[] args) {
        Object obj = new Object();
        //obj.getClass();返回对象的所属，获取对象的运行时信息
        System.out.println(obj.getClass());

        //obj.toString()返回对象的字符串由16进制表示
        System.out.println(obj.toString());


        //obj1.equals(obj2)   等于obj1 == obj2,比较内存地址值
//
//        Object obj1 = new Object();
//        Object obj2 = new Object();
//        Object obj3 = obj1;
//        System.out.println(obj1.equals(obj2));
//        System.out.println(obj1.equals(obj3));

        Student stu1 = new Student(18, "帅");
        Student stu2 = new Student(19, "帅");
        System.out.println(stu1.equals(stu2));
        System.out.println(stu1.hashCode());
        System.out.println(stu2.hashCode());
    }
}
